<?php

use yii\db\Migration;

/**
 * Class m180201_104614_add_cloumn_to_project_update_log
 */
class m180201_104614_add_cloumn_to_project_update_log extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->addColumn('project_update_log','type',$this->smallInteger()->notNull()->defaultValue(1)->comment('项目类型，默认混合类1，抵押类2'));
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        echo "m180201_104614_add_cloumn_to_project_update_log cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180201_104614_add_cloumn_to_project_update_log cannot be reverted.\n";

        return false;
    }
    */
}
